﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;

namespace Vanfa.Common
{
    /// <summary>
    /// 工具箱
    /// </summary>
    public class Toolkit
    {
        /// <summary>
        /// 弹出框
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="p"></param>
        public static void MessageBox(string msg, Page p)
        {
            p.ClientScript.RegisterStartupScript(p.GetType(), "msg", "alert('" + msg + "')", true);
        }

        public static void MessageBox(string msg,string url ,Page p)
        {
            p.ClientScript.RegisterStartupScript(p.GetType(), "msg", "alert('" + msg + "');location.href='" + url + "'", true);
        }
    }
}
